<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<script type="text/javascript" charset="utf-8"
		src="<%=basePath%>ueditor/editor_all.js"></script> 
<script type="text/javascript" charset="utf-8"
		src="<%=basePath%>ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" charset="utf-8"
		src="<%=basePath%>ueditor/editor_config.js"></script>
		<c:if test="${message }">
		  <div style="width:98%; height:50px;">
		            <strong> 添加成功</strong>
		  </div>  
		</c:if>
		<c:if test="${update==true }">
		  <div style="width:98%; height:50px;">
		            <strong> 修改成功</strong>
		  </div>  
		</c:if>
<form action="<%=basePath %>backend/updatexlabxx" method="post" id='ResearchLabForm'>
			
           <div class="row div-common">
           <div class="span6 input-prepend" >
                 <span class="add-on">实验室类型</span>
                  <select class="span6" id='labtype' name='labType'>
                  <option value='省重点实验室'>省重点实验室</option>
                  <option value="学科型实验室">学科型实验室</option>
                  </select>
                  <span></span> 
               </div>
          <div class="span6 input-prepend" >
                 <span class="add-on"style=''>研究所名称</span>
                 <input  value='${lab.labName }'
                  type="text" name="labName" >
              <span></span>
              </div> 
              <div class="span6 input-prepend" style='margin-left:0px;'>
                 <span class="add-on">实验室位置</span>
                 <input  type="text" name="labPosition"value="${lab.labPosition }" />
              
              </div>
              </div>
            <div class='row div-common' >
                <h3>实验室简介：</h3>
              <div style='margin-top: 10px;'>
			  
		       <script  id="editor" ></script>
		       </div>
            </div>
		      
	    <!-- <input type="checkbox" value="0" name='index' id='index'  />首页新闻 -->
		<input  type="submit" value="完成" style="margin-left: 600px;margin-top: 10px;" class="btn btn-info" onclick="return getContent();"/></div>
		<input  type="hidden" id='introduce'value="${lab.labIntroduce }" name="labIntroduce">
		<input id='id' name='labId' value="${lab.labId }" type="hidden" >
		<input id='type' name='' value="${lab.labType }" type="hidden" >
	</form>
	<script type="text/javascript">
	var editor = new UE.ui.Editor();
    editor.render("editor");
    $(function(){
		var content = $("#introduce").val();
	
         editor.ready(function(){
           editor.setContent(content);
          });
         $("#labtype").val($("#type").val());
    });
	var ue = UE.getEditor('editor');
    function getContent() {
    	alert(("#labtype").val());
        var str= ue.getContent();
        $("#introduce").val(str);
        var str="";
       return true;
    }
  
</script>
